package br.ufrj.ia.q3;

import aima.core.agent.impl.DynamicPercept;

public class VacuumEnvPercept3 extends DynamicPercept {
	public static final String ATTRIBUTE_AGENT_LOCATION = "agentLocation";
	public static final String ATTRIBUTE_STATE = "state";

	public VacuumEnvPercept3(String agentLocation,
			VacuumEnvironment3.LocationState3 state) {
		setAttribute(ATTRIBUTE_AGENT_LOCATION, agentLocation);
		setAttribute(ATTRIBUTE_STATE, state);
	}

	public String getAgentLocation() {
		return (String) getAttribute(ATTRIBUTE_AGENT_LOCATION);
	}

	public VacuumEnvironment3.LocationState3 getLocationState() {
		return (VacuumEnvironment3.LocationState3) getAttribute(ATTRIBUTE_STATE);
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();

		sb.append("[");
		sb.append(getAgentLocation());
		sb.append(", ");
		sb.append(getLocationState());
		sb.append("]");

		return sb.toString();
	}
}
